const mongoose = require('mongoose');
// 创建和数据库对应的数据结构
// 类型包括：String Number Date Array  Object首字母大写
let filmsSchema = new mongoose.Schema({
    name: String,
    ename: String,
    type: String,
    area: String,
    time: String,
    upDate: String,
    year: String,
    score: String,
    count: String,
    want: String,
    intro: String,
    director: Array,
    actor: Array,
    images: Array,
});

// 将构造的模型对象导出
module.exports = mongoose.model('filmsModel', filmsSchema, 'films')